package org.teamswift.crow.rbac.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.teamswift.crow.rbac.vo.CrowOrganizationVo;
import org.teamswift.crow.rest.annotation.I18N;
import org.teamswift.crow.rest.common.BaseCrowEntity;
import org.teamswift.crow.rest.common.ICrowEntity;

import javax.persistence.*;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
public class CrowOrganization extends BaseCrowEntity<Integer, CrowOrganizationVo> {

    @Id
    @I18N("crow.id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Override
    public Integer gtId() {
        return id;
    }

    @Column(nullable = false, length = 100, unique = true)
    private String name;

    @Column(nullable = false, length = 20)
    private String shortName;

    private String description;

    private String udf1;

    private String udf2;

    private String udf3;

    private String udf4;

    private String udf5;

    private String udf6;

    @Override
    public void setId(Integer id) {
        this.id = id;
    }

}
